package com.eshop.utils;

import java.util.Objects;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;

public class RequestHolder
{
    public static HttpServletRequest getHttpServletRequest() {
        return Objects.requireNonNull((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
    }
}
